﻿#include "MaterialFLuidsWapper.h"
#include "FITK_Kernel/FITKAppFramework/FITKMessage.h"
Fluids * MaterialFLuidsWapper::new_Fluids()
{
    return new Fluids;
}

void MaterialFLuidsWapper::delete_Fluids(Fluids * obj)
{
    if (obj) delete obj;
}

Fluids * MaterialFLuidsWapper::static_Fluids_GetFluids(const QString& name)
{
    return new Fluids(name);
}

QString MaterialFLuidsWapper::getName(Fluids * obj)
{
    if (obj)
        return obj->getName();
    return QString();
}

void MaterialFLuidsWapper::setName(Fluids * obj, const QString & name)
{
    if (!obj)return;
    bool ok = obj->setName(name);
    if (!ok) {
        AppFrame::FITKMessageError("Set Name failed !");
    }
}

void MaterialFLuidsWapper::setFluidProp(Fluids * obj, double soundSpeed, double density, double viscosity, double specificHeat, double prandtl, double molecular, int type)
{
    if (!obj)return;
    bool ok = obj->setFluidProp(soundSpeed, density, viscosity, specificHeat, prandtl, molecular,type);
    if (!ok) {
        AppFrame::FITKMessageError("Set FLuid Properties failed !");
    }
}

void MaterialFLuidsWapper::createMaterial(Fluids * obj, const QString & name)
{
    if (!obj)return;
    bool ok = obj->createMaterial(name);
    if (!ok) {
        AppFrame::FITKMessageError("Create FLuid Material failed !");
    }
}

Fluids::Fluids(const QString & name):
    Acoustics::PyFITKMaterialsFluid(name)
{

}

Fluids::Fluids() :
    Acoustics::PyFITKMaterialsFluid()
{

}
